import request from '@/utils/request'


// 新增
export function addDictionary(data) {
  return request({
    url: '/project/PhaseDictionary/save',
    method: 'post',
    data: data
  })
}

// 分页查询
export function listDictionary(query) {
  return request({
    url: '/project/PhaseDictionary/page',
    method: 'get',
    params: query
  })
}

//所有list
export function listAllDictionary() {
  return request({
    url: '/project/PhaseDictionary/list',
    method: 'get',
    params: query
  })
}


export function getDictionary(id) {
    return request({
      url: '/project/PhaseDictionary/details',
      method: 'get',
      params: { id: id } // 查询参数
    });
  }

  // 修改
  export function updateDictionary(data) {
    return request({
      url: '/project/PhaseDictionary/update',
      method: 'put',
      data: data
    })
  }

//删除
  export function delDictionary(id) {
    return request({
      url: '/project/PhaseDictionary/'+id,
       method: 'delete'
    })
  }

//检查当前用户是否有点击下一步按钮的权限
export function getNextPermission(query) {
  return request({
    url: '/project/PhaseDictionary/next',
    method: 'get',
    params: query
  })
}


//点击下一步的时候校验当前环节的规则
export function getCheck(query) {
  return request({
    url: '/project/PhaseDictionary/check',
    method: 'get',
    params: query
  })
}

//
export function checkCosting(query) {
  return request({
    url: '/project/PhaseDictionary/checkCosting',
    method: 'get',
    params: query
  })
}



  
